package com.wfcm.service.impl;

import com.wfcm.dao.IapDao;
import com.wfcm.entity.IapParam;
import com.wfcm.entity.IapProduction;
import com.wfcm.service.IapService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class IapServiceImpl implements IapService {

    @Autowired
    private IapDao iapDao;

    @Override
    public List<IapProduction> productionList(String version) {
        return iapDao.productionList(version);
    }

    @Override
    public IapProduction queryProduction(String productionId) {
        return iapDao.queryProduction(productionId);
    }

    @Override
    public Integer addVerifyReceiptLog(IapParam iapParam) {
        return iapDao.addVerifyReceiptLog(iapParam);
    }

    @Override
    public Boolean queryVerifyReceiptLog(String transactionId) {
        return iapDao.queryVerifyReceiptLog(transactionId) == null ? true : false;
    }
}
